Skip to content

feat: switch start flow to Codex Cloud session lifecycle - #6

Merged
ubcent merged 3 commits into
mainfrom
feat/implement-codex-cloud-integration
Mar 14, 2026
Merged

feat: switch start flow to Codex Cloud session lifecycle#6
ubcent merged 3 commits into
mainfrom
feat/implement-codex-cloud-integration

Conversation

@ubcent

@ubcent ubcent commented Mar 14, 2026

Copy link
Copy Markdown
Contributor

Motivation

  • Replace blocking local codex exec runs with Codex Cloud sessions so each step executes in an isolated cloud sandbox and can be resumed across process restarts.
  • Persist cloud session_id per step so vexdo start --resume can continue in-flight cloud runs and support arbiter fix/resume iterations.

Description

  • Rewrote src/lib/codex.ts to implement the cloud lifecycle helpers: submitTask(prompt, {cwd}), resumeTask(sessionId, feedback), pollStatus(sessionId, {intervalMs, timeoutMs}), getDiff(sessionId), and applyDiff(sessionId), plus exec as a convenience wrapper; added CodexTimeoutError and structured CodexError with codes.
  • Updated src/commands/start.ts to drive the new cloud flow: submit → poll → diff → review, and added runCloudReviewLoop to handle review/arbiter cycles and call resumeTask when fixes are requested.
  • Added CodexErrorCode and session_id?: string to src/types/index.ts and persist session_id to step state via src/lib/state.ts so resume works across restarts.
  • Updated tests: new/updated unit tests in test/unit/codex.test.ts for session parsing, polling, timeout and diff handling, and updated integration tests in tests/integration/start.test.ts to validate submit/poll/diff/resume interactions and session_id persistence.

Testing

  • Ran targeted tests: npm test -- --run test/unit/codex.test.ts tests/integration/start.test.ts which passed.
  • Ran full test suite: npm test which passed all tests (62 passed), and built the CLI with npm run build which succeeded.

Codex Task

@ubcent
ubcent merged commit 0d37447 into main Mar 14, 2026
8 checks passed
@ubcent
ubcent deleted the feat/implement-codex-cloud-integration branch March 14, 2026 21:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant